(eglot--signal-textDocument/didChange): Fix tests
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 19 Apr 2024 03:39:30 +0000 (23:39 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 19 Apr 2024 03:39:30 +0000 (23:39 -0400)
commitc833892140fbf4be45161bf85d4c1253c5503949
tree70c3542d8e69e355ea4d8e4f86b26e444684b422
parenta3f6d92714c31ccb87f56b13ee2606c05493c87d
(eglot--signal-textDocument/didChange): Fix tests

The tests call `eglot--signal-textDocument/didChange` eagerly,
which means in the case where we use `track-changes` that they
call it before the tracker's signal has been called.
So make sure we fetch pending changes even if we haven't yet
been notified of them, and make sure `eglot--versioned-identifier`
is incremented even when the signal is not called.

* lisp/progmodes/eglot.el (eglot--track-changes-fetch)
(eglot--after-change): Increment `eglot--versioned-identifier` here...
(eglot--track-changes-signal): ...instead of here.
(eglot--signal-textDocument/didChange): Try and fetch changes even if the
tracker's signal wasn't called yet.

* test/lisp/progmodes/eglot-tests.el (eglot-tests--get): New function.
(eglot-tests--lsp-abiding-column-1): Use it.
lisp/progmodes/eglot.el
test/lisp/progmodes/eglot-tests.el